<template>
	<view class="home">
		<u-navbar :safeAreaInsetTop="true" :placeholder="true" bgColor="rgba(15, 15, 38, 0)"
			:autoBack="true" leftIconColor="#fff">
			<view class="u-nav-slot" slot="center" style="color: #fff;">
				{{titleData}}
			</view>
		</u-navbar>
		<view class="box_list">
			<view class="box_i" v-for="(i,index) in list" :key="index">
				<view class="b_top">
					{{i.data}}号闸位
				</view>
				<view class="b_bom">
					<view class="text_a">
						瞬时流量：
					</view>
					<view class="text_b">
						{{i.data1}} m³/s
					</view>
				</view>
				<view class="b_bom">
					<view class="text_a">
						累计流量：
					</view>
					<view class="text_b">
						{{i.data2}} m³/s
					</view>
				</view>
				<view class="b_bom">
					<view class="text_a">
						闸门开度：
					</view>
					<view class="text_b">
						{{i.data3}} m
					</view>
				</view>
				<view class="b_bom">
					<view class="text_a">
						闸位：
					</view>
					<view class="text_b">
						{{i.data4}} m
					</view>
				</view>
				<view class="b_bom">
					<view class="text_a">
						水位：
					</view>
					<view class="text_b">
						{{i.data5}} m
					</view>
				</view>
				<view class="b_bom">
					<view class="but_a">
						<u-button class="but" type="primary" text="开闸"></u-button>
						<u-button class="but" type="success" text="关闸"></u-button>
						<u-button class="but" type="error" text="停闸"></u-button>
						<u-button class="but" type="warning" text="设置"></u-button>
					</view>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						data: '1',
						data1: '126',
						data2: '89624',
						data3: '0.6',
						data4: '3.5',
						data5: '6',
					},
					{
						data: '2',
						data1: '105',
						data2: '69842',
						data3: '0.6',
						data4: '3.5',
						data5: '6',
					},
					{
						data: '3',
						data1: '135',
						data2: '86543',
						data3: '0.6',
						data4: '3.5',
						data5: '6',
					},
					{
						data: '4',
						data1: '126',
						data2: '964542',
						data3: '0.6',
						data4: '3.5',
						data5: '6',
					}
				],
				titleData: ''
			}
		},
		onLoad(option) {
			this.titleData = option.nickName
		},
		methods: {

		}
	}
</script>
<style scoped lang="scss">
	.home {
		position: fixed;
		top: 0rpx;
		left: 0;
		width: 100%;
		height: 100%;
		background-image: url('@/static/home/abt.jpg'); 
		background-repeat: no-repeat;
		background-size: cover;

		.box_list {
			overflow-y: scroll;
			height: 100%;
			padding: 30rpx;
			color: #ffffff;
			font-size: 50rpx;

			.box_i {
				padding: 20rpx 30rpx;
				margin-bottom: 30rpx;
				text-align: center;
				border-radius: 30rpx;
				background-color: rgba(0, 0, 0, 0.5);

				.b_top {
					font-size: 60rpx;
					border-bottom: 3rpx solid #838ec5;
				}

				.b_bom {
					display: flex;
					justify-content: space-between;
					align-items: center;

					.text_a {
						width: 260rpx;
						text-align: justify;
						text-align-last: justify;
						color: #cedafe;
					}

					.text_b {
						color: #23ffd3;
					}

					.but_a {
						display: flex;
						justify-content: space-between;
						align-items: center;
						flex-wrap: wrap;

						.but {
							width: 300rpx;
							margin: 10rpx 0;
						}
					}
				}
			}
		}
	}
</style>